package com.roc.service;

import java.util.List;

import com.roc.pojo.ModuleCategory;
import com.roc.pojo.Operators;
import com.roc.pojo.PowerModel;
import com.roc.pojo.PowerModule;
import com.roc.pojo.ProfitModule;
import com.roc.pojo.ProfitPercentModule;
import com.roc.pojo.ProfitRuleModule;


public interface IModelService {
	List<ModuleCategory> queryAllModuleCategoryList() throws ServiceException;
	void saveModelBatch(Operators oper,List<String> list,PowerModel modelHead)throws ServiceException;
	List<PowerModule> queryModule(Long operatorsId,String modelCode)throws ServiceException;
	PowerModel queryModelById(Long id)throws ServiceException; 
	boolean updateSave(PowerModel model,List<PowerModule> moduleList,Operators oper)throws ServiceException;
	boolean deleteModel(PowerModel model,Operators oper)throws ServiceException;
    List<Object> listAllProfitModelHeads(Operators oper)throws ServiceException;

    /**
     * 添加 模板详细
     * @param oper 当前登录账号
     * @param profitModule 模板信息
     * @throws ServiceException
     */
	void saveProfitModuleBatch(Operators oper,ProfitModule profitModule)throws ServiceException;
	/**
	 * 通过id 模板详细
	 * @param id
	 * @return
	 * @throws ServiceException
	 */
	ProfitModule queryProfitModuleById(Long operatorsId,String modelId) throws ServiceException; 
	ProfitModule queryProfitModuleByModuleName(String moduleName) throws ServiceException ;
	List<ProfitModule> queryProfitModuleByAgentId(String agentId) throws ServiceException ;
	
	ProfitModule queryDefProfitModuleByAgentId( long agentId) throws ServiceException ;
	
	List<ProfitRuleModule> queryProfitRuleModule(Long operatorsId,String modelId) throws ServiceException;
	List<ProfitPercentModule> queryProfitPercentModule(Long operatorsId,String modelId) throws ServiceException;
	
	boolean updateSaveProfitModule(ProfitModule profitModule,Operators oper,ProfitModule oldPro) throws ServiceException;
	
	boolean deleteProfitModule(ProfitModule profitModule,Operators oper) throws ServiceException;
	boolean setDefaultProfitModule(String modelId,long agentId) throws ServiceException;
}
